﻿
@{
    ViewData["Title"] = "SeeBecomeView";
    Layout = null;
}

<link href="~/Content/bootstrap-theme.css" rel="stylesheet"/>
<link href="~/layui/css/layui.css" rel="stylesheet"/>
<link href="~/layer/skin/layer.css" rel="stylesheet"/>


<div class="layui-card" style="margin-left: 200px"> 
    <div class="layui-card-header">查看入职信息</div>
    <div class="layui-card-body">
        <br>
        <table>
            <tr>
                <td style="width: 200px">部  门：</td>
                <td>
                    <span id="DepName"></span>
                </td>
            </tr>
            <tr>
                <td>职  位：</td>
                <td>
                    <span id="PostName"></span>
                </td>
            </tr>
            <tr>
                <td>员工姓名：</td>
                <td>
                    <span id="SaffName"></span>
                </td>
            </tr>
            <tr>
                <td>上级负责人：</td>
                <td>
                    <span id="UpName"></span>
                </td>
            </tr>
            <tr>
                <td>入职日期：</td>
                <td>
                    <span id="Bdate"></span>
                </td>
            </tr> 
            <tr>
                <td>申请日期：</td>
                <td>
                    <span id="Bdatetime"></span>
                </td>
            </tr> 
            <tr>
                <td>试用期工作总结：</td>
                <td>
                    <span id="Bsum"></span>
                </td>
            </tr>
            <tr>
                <td>对公司的意见和建议：</td>
                <td>
                    <span id="Bopinion"></span>
                </td>
            </tr>
        </table>
    </div>
</div>

<div class="layui-card">
    <div class="layui-card-header">审批流程</div>
    <div class="layui-card-body">
        <br>
        
    </div>
</div>
<button onclick="location.href ='/PersonnelMatters/BecomeARegularWorkerView'"  style="width: 200px; margin-left: 200px;" type="button" class="layui-btn layui-btn-fluid">返回</button>

<script src="~/Scripts/jquery-3.4.1.min.js"></script>
<script src="~/layui/layui.js"></script>
<script src="~/layer/layer.js"></script>
<script>
    var id = @ViewBag.id;
    $(function() {
        $.ajax({
            url: "/PersonnelMatters/GetBecomeData?id=" + id+"&state="+1,
            type: "get",
            success: function(obj) {
                console.log(obj);
                $("#DepName").text(obj.depName);
                $("#PostName").text(obj.postName);
                $("#SaffName").text(obj.saffName);
                $("#UpName").text(obj.upName);
                $("#Bdate").text(renderTime(obj.bdate));
                $("#Bdatetime").text(renderTime(obj.bdatetime));
                $("#Bopinion").text(obj.bopinion);
                $("#Bsum").text(obj.bsum);
            }
        });
    });
    function renderTime(date) {
        var dateee = new Date(date).toJSON();
        return new Date(+new Date(dateee) + 8 * 3600).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '');
    }

</script>
